/// @tags: Math
#include <cstdio>
#include <iostream>

using std::cin, std::cout;

namespace BlueQuantum {

int main() {
  int n = 0;
  cin >> n;
  unsigned long long ans = 1ull * n * (n - 1) / 2 * (n - 2) / 3 * (n - 3) / 4;
  cout << ans;
  return 0;
}

}  // namespace BlueQuantum

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("/tmp/CodeTmp/testdata.in", "r", stdin);
  freopen("/tmp/CodeTmp/testdata.out", "w", stdout);
#else
  freopen("P2181 对角线.in", "r", stdin);
  freopen("P2181 对角线.out", "w", stdout);
#endif
#endif

  std::ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  return BlueQuantum::main();
}
